function [AllDataTraining2, AllDataTesting2, SampledDataTraining2, UnSampledDataTraining2] = Ddavid_use_distribution_features(AllDataTraining, AllDataTesting, DataSampler, DistributionFeatures, FeatureUsingList)

% FeatureUsingList: UsingFeatureLabeledRank, UsingFeatureDensity, UsingFeatureCommonNeighbor

AllDataTraining2 = AllDataTraining;
AllDataTesting2 = AllDataTesting;
if(FeatureUsingList(1) == 1)
    AllDataTraining2 = [AllDataTraining2 DistributionFeatures.TrainingLabeledRanksTable];
    AllDataTesting2 = [AllDataTesting2 DistributionFeatures.TestingLabeledRanksTable];
end
if(FeatureUsingList(2) == 1)
    AllDataTraining2 = [AllDataTraining2 DistributionFeatures.TrainingDensityTable];
    AllDataTesting2 = [AllDataTesting2 DistributionFeatures.TestingDensityTable];
end
if(FeatureUsingList(3) == 1)
    AllDataTraining2 = [AllDataTraining2 DistributionFeatures.TrainingCommonNeighborTable];
    AllDataTesting2 = [AllDataTesting2 DistributionFeatures.TestingCommonNeighborTable];
end
SampledDataTraining2 = AllDataTraining2(DataSampler == 1, :);
UnSampledDataTraining2 = AllDataTraining2(DataSampler == 0, :);
